# 拷贝:在内存空间中,复制一份一样的空间,内容一样,但内存地址不一样

import copy

# 浅拷贝
list1 = [1, 2, ['a', 'b', 'c']]
list2 = copy.copy(list1)
print(list2)
print(id(list1[2][1]))
print(id(list2[2][1]))

list1[2][1] = 'aaa'
print(list1)
# 深拷贝
list1 = [1, 2, ['a', 'b', 'c']]
list2 = copy.deepcopy(list1)
print(list2)
print(id(list1[2][1]))
print(id(list2[2][1]))

list1[2][1] = 'aaa'
print(list1)
